package org.mifos.boss.service;



import java.util.List;

import org.mifos.boss.business.UserBusinessInterface;
import org.mifos.boss.domainmodel.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


/**
 * A class, which would be used to perform all the actions pertaining to Customer
 * 
 * All the different interfaces like UI, webservice etc. would invoke methods in this class to perform the required business operation
 * 
 * All this layer is expected to do is make a call to business layer
 * 
 * This layer contains only coarse-grained methods/functionality, leaving the fine-grained implementation to next level
 * 
 */

@Service(value="userService")
public class UserServiceImpl  extends BaseBossService implements UserServiceInterface {
	@Autowired
	@Qualifier("userBusiness")
	UserBusinessInterface userBusiness;
	
	@Transactional
	public boolean validateUser(User user){
		return userBusiness.validateUser(user);
	}
	
	@Transactional
	public boolean addUser(User user) {
		return userBusiness.addUser(user);
	}

	@Transactional
	public List<User> listUser() {

		return userBusiness.listUser();
	}

	@Transactional
	public boolean removeUser(String userID) {
		return userBusiness.removeUser(userID);
	}
	
}
